<template>
	<view class="home-container">
		<topNav
			class="home-top"
			title="首页"
			:isBackTo="false"
			:isUnderline="true"
			:isTransparent="false"
		></topNav>
		<view class="content-box">
			<view
				class="list-item"
				v-for="(item, index) in list"
				:key="index"
				@click="clickEvent(item)"
			>
				<view class="item-img">
					<view class="img-box">
						<u-icon
							:name="item.icon"
							color="#ababab"
							size="88"
						></u-icon>
					</view>
				</view>
				<view class="item-text">{{ item.text }}</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			title: "Hello",
			value: "",
			list: [
				{
					tag: "zljc",
					text: "质量检查",
					en: "classroom emotions",
					icon: "search",
					url: "/pages/index/zljc/index",
				},
				{
					tag: "test",
					text: "考试",
					en: "classroom emotions",
					icon: "edit-pen",
					url: "/pages/index/test/index",
				},
				{
					tag: "test",
					text: "审批处理",
					en: "classroom emotions",
					icon: "order",
					url: "/pages/index/audit/index",
				},
				{
					tag: "test",
					text: "行政通知",
					en: "classroom emotions",
					icon: "chat",
					url: "/pages/index/test/index",
				},
				{
					tag: "test",
					text: "人员技术档案",
					en: "classroom emotions",
					icon: "calendar",
					url: "/pages/index/test/index",
				},
				{
					tag: "test",
					text: "敏感指标",
					en: "classroom emotions",
					icon: "tags",
					url: "/pages/index/test/index",
				},
				{
					tag: "test",
					text: "体温上报",
					en: "classroom emotions",
					icon: "heart",
					url: "/pages/index/test/index",
				},
				{
					tag: "test",
					text: "护士排班",
					en: "classroom emotions",
					icon: "server-man",
					url: "/pages/index/test/index",
				},
			],
		};
	},
	onLoad() {},
	methods: {
		clickEvent(obj) {
			uni.navigateTo({
				url: obj.url,
			});
		},
	},
};
</script>

<style lang="scss" scoped>
.home-container {
	height: 100vh;
	// background-color: #fe689b;
	background-color: #f7f7f7;
	.content-box {
		padding: 32rpx;
		// display: flex;
		// justify-content: space-around;
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		row-gap: 32rpx;
		.list-item {
			float: left;
			.item-img {
				width: 144rpx;
				height: 144rpx;
				background-color: #ffffff;
				border: 2rpx solid rgba(0, 0, 0, 0.1);
				border-radius: 16rpx;
				// background-image: url("@/static/images/my/icon_education.png");
				// background-repeat: no-repeat;
				// background-size: 100% 100%;
				margin: auto;
				display: flex;
				justify-content: center;
				align-items: center;
				.img-box {
					width: 88rpx;
					height: 88rpx;
				}
			}
			.item-text {
				text-align: center;
				margin-top: 16rpx;
			}
		}
	}
}
</style>
